from django.db import models

# Create your models here.

#用户表
class User(models.Model):

    username = models.CharField(max_length=200)

    class Meta:
        db_table = 'user'


#产品表
class Goods(models.Model):
    #名称
    username = models.CharField(max_length=200)
    #价格
    num = models.CharField(max_length=200)
    #图片
    img = models.CharField(max_length=200)

    class Meta:
        db_table = 'goods'

#订单表
class Order(models.Model):
    #订单日期
    time_s = models.DateTimeField(auto_now_add=True)
    #订单号
    order_number = models.CharField(max_length=200)
    #收货人
    s_name = models.CharField(max_length=200)
    #金额
    price = models.CharField(max_length=200)
    #产品id
    goods_id = models.IntegerField()


    class Meta:
        db_table = 'order'





class C_S(models.Model):

    cs = models.CharField(max_length=100)

    class Meta:
        db_table = 'cs'
